<template>
  <el-select v-model="name" clearable placeholder="请选择课程标签" :multiple="props.multiple==1">
    <el-option v-for="el in tags" :key="el.tagid" :label="el.tagname" :value="el.tagid" />
  </el-select>
</template>

<script setup lang="ts">
const { proxy } = getCurrentInstance();
let props = defineProps(["modelValue", "multiple"]);
const emit = defineEmits(["update:modelValue", "fatherMethods"]);

let tags = ref([]);

const name = computed({
  get() {
    return props.modelValue;
  },
  set(value: Number) {
    emit("update:modelValue", value);
    emit("fatherMethods");
  },
});

onMounted(() => {
  getTag();
});

async function getTag() {
  tags.value = await proxy.$apis.moxueyuanTags({ type: "list" });
}
</script>



<style lang="scss" scoped>
.container {
}
</style>



